[MAINT] Add pre commit hooks#94
[MAINT] Add pre commit hooks#94ndgrigorian wants to merge 6 commits intofeature/add-numpy-random-interfacefrom
Conversation
321ba3b to
f9cfa6e
Compare
|
these changes have (by some twisted miracle) introduced build failures—but only on Windows. I will have to undo and find the root cause of this. |
f9fdc04 to
dbdcae3
Compare
dbdcae3 to
4ca26c7
Compare
4ca26c7 to
bf54ddc
Compare
seems clang-format caused it, likely order of includes. I will exclude include blocks from clang-formatting |
715bb4f to
e5b5825
Compare
ce639f1 to
ec87861
Compare
e612350 to
5ffbb5a
Compare
ec87861 to
47953a2
Compare
| repos: | ||
| - repo: https://github.com/pre-commit/pre-commit-hooks | ||
| rev: v6.0.0 | ||
| hooks: |
There was a problem hiding this comment.
What do you think to extend with more ones, like dpnp has:
hooks:
# Git
- id: check-added-large-files
- id: no-commit-to-branch
name: "ensure no direct commit to master/maintenance branches"
args: [--branch, "master", --pattern, "maintenance/.*"]
- id: check-case-conflict
- id: check-illegal-windows-names
# Contents
- id: check-ast
- id: check-builtin-literals
- id: check-case-conflict
- id: check-executables-have-shebangs
- id: check-merge-conflict
- id: check-shebang-scripts-are-executable
- id: check-symlinks
- id: check-toml
- id: debug-statements
- id: destroyed-symlinks
- id: end-of-file-fixer
- id: fix-byte-order-marker
- id: mixed-line-ending
- id: trailing-whitespaceThere was a problem hiding this comment.
not a bad idea, one thing I'm also considering is moving as much linting as possible across all of the projects to ruff
numpy uses it, and it could replace black, flake8, and isort at once, maybe one or two others
But this isn't necessarily incompatible with that, so I can add these
There was a problem hiding this comment.
Yep, it'd be great to move to the ruff in the future.
| "--errors-only", | ||
| "--disable=import-error", | ||
| ] | ||
|
|
There was a problem hiding this comment.
what is about?
- repo: https://github.com/gitleaks/gitleaks
rev: v8.30.0
hooks:
- id: gitleaksThere was a problem hiding this comment.
and for GH actions:
- repo: https://github.com/rhysd/actionlint
rev: v1.7.11
hooks:
- id: actionlint
This PR adds pre-commit hooks to the project, following similar work last year in
mkl_fftAlso updates to conform with new linters (including cython-lint), adds a pre-commit check workflow, and adds changes to
.git-blame-ignore-revsCloses #61